<% layout('/layouts/default.html', {title: '批示页面', libs: ['validate','fileupload']}){ %>
<div class="main-content">
	<div class="box box-main">
		<#form:form id="inputForm" model="${dcSupTaskActionDto}" action="${ctx}/action/dcSupTaskAction/saveData?taskId=${dcSupTaskActionDto.id}" method="post" class="form-horizontal">
			<%if(dcSupTaskActionDto.explainContent == ''|| dcSupTaskActionDto.explainContent ==null){%>
			<div class="box-body">
			<%}else{%>
			<div class="box-body" style="height: 352px;">
			<%}%>
				<div class="col-xs-12" style="margin-bottom: 18px;">
					<#form:hidden path="id"/>
					<%if(dcSupTaskActionDto.explainContent == ''|| dcSupTaskActionDto.explainContent ==null){%>
						<#form:textarea path="explainContent" rows="12" maxlength="1000" class="form-control" placeholder="请在此处输入批示"/>
					<% }else{ %>
						<div class="control-label " style="text-align: left;overflow:auto;">${text(dcSupTaskActionDto.explainContent)}</div>
					<%}%>
				</div>
			</div>
			<%if(dcSupTaskActionDto.explainContent == ''|| dcSupTaskActionDto.explainContent ==null){%>
			<div class="box-footer">
				<div class="row" style="text-align: right;">
					<div class="col-sm-offset-2 col-sm-10">
						<button type="submit" class="btn btn-sm btn-primary" id="btnSubmit"><i class="fa fa-check"></i> ${text('确 定')}</button>&nbsp;
						<button type="button" class="btn btn-sm btn-default" id="btnCancel" onclick="js.closeCurrentTabPage()"><i class="fa fa-reply-all"></i> ${text('关 闭')}</button>
					</div>
				</div>
			</div>
			<%}%>
		</#form:form>
	</div>
</div>
<% } %>
<script>
$("#inputForm").validate({
	submitHandler: function(form){
		js.ajaxSubmitForm($(form), function(data){
			js.showMessage(data.message);
			if(data.result == Global.TRUE){
				js.closeCurrentTabPage(function(contentWindow){
					contentWindow.page();
				});
			}
		}, "json");
    }
});
</script>